Dialog Studio Manual for Dialog Studio version 1.1
http://macscripter.net/dialog_studio.html
14th March 2001
For purposes of this section, the term “item” refers to any of the dialog items such as buttons, checkboxes, etc. and “window” or “main window” refers to the main dialog window in Dialog Studio which provides the basis of your dialog.
------------------------------------
Contents
Menu items
The Tools palette
The Property palette
Preferences
Creating a Dialog
Saving a dialog
Exporting an AppleScript
Other Notes
------------------------------------
Menu items
Most menu items are accompanied by a command key shortcut.
File
• New: create a new empty window. If a window exists, and contains one or more
items, a save prompt is raised.
• Open: asks the user to open a Dialog Studio file.
• Close: close the current window. If the window contains one or more items, a save prompt is raised.
• Save as: save the dialog as a native Dialog Studio file.
• Export: exports scripts using any of 4 options found in the preferences dialog (see below).
• Quit: quits, but if a window exists, and contains one or more items, a save prompt is raised.
Edit
• Undo: undoes the last move performed by dragging an item in the window.
• Paste: enables pasting into edit fields on the “Properties” palette and in
the “Preview” palette (see preferences, below)
• Preferences - opens the preferences dialog.
Item
• Select next - selects the next item in the main window.
• Duplicate - dupliates the currently selected item. By default this is 16 pixel across and 16 pixels down.
If the option key is pressed while selecting this menu item, a dialog is raised asking for
duplicate offsets. These offsets are remembered during the current session of Dialog Studio.
• Move again - moves an item in the main window to the same relative offsets as the last item
that was moved (by dragging).
• Bring to front - brings an item to the front. Useful for bring items in front of boxes.
• Send to Back - sends an item to the back.
• Nudge - selecting any of the nudge keys nudges the currently selected item in the direction
indicated by one pixel. Holding down the option key increases the nudge factor to 10 pixels.
• Clear - deletes the current item.
Window
• About MacScripter.net - raises a dialog containing information about MacScripter.net website.
• Show/Hide Tools - opens the tools palette if it is closed.
• Show/Hide Properties - opens the properties palette if it is closed.
• Show/Hide Guides - toggles the guides on and off
• Show/Hide Tool Tips -toggles the tool tips on and off.
------------------------------------
The Tools palette
The tools palette is divided into three sections:
Dialog item buttons - The dialog item buttons are, in order from left to right and downwards are:
To include these items in your dialog, drag then from the tools palette onto the main window.
• Push button
• Icon
• Radio button
• Checkbox
• Static text
• Editable text field
• List box
• Popup menu
• Box
• Line (actually a 1 pixel deep box).
Nudge buttons - The nudge buttons move or increase the size of the currently selected item in the indicated direction. By holding down a combination of option and command keys, different tasks occur:
• Command key - the item increases in size by 1 pixel
• Option key - the item is moved by 10 pixels.
• Option and Command keys - the item increases in size by 10 pixels
Other editing buttons - These are, in order from left to right and downwards are:
• Move - which performs the same task as the “Move” menu item.
• Duplicate - which performs the same task as the “Duplicate” menu item
(holding option while pressing this button raises the Duplicate dialog).
• Open - which performs the same task as the “Open” menu item.
• Delete - which performs the same task as the “Clear” menu item.
• Save - which performs the same task as the “Save” menu item.
• Export button - which performs the same task as the “Export” menu item.
------------------------------------
The Property palette
The property palette is divided into two sections:
Item - The contents of the item tab of the Properties palette reflect the properties of the currently selected item. Depending on the item selected, options in this tab allow the user to set that items properties such as name, contents, width and height:
• push buttons - choose its default item property.
• checkboxes - choose their value property (whether it is turned on or off).
• radio buttons - choose their value property (whether it is turned on or off).
• text field - a password field option is shown.
Window -The window tab contains the settings for the main window:
• Style - the style of the dialog
• Closeable - whether the window is closeable (only applicable to Standard window and floating palettes)
• Name - the name of the window
• Font - the font of the window
• Size - the size of the font of the window
• Use Bounds - Turn Use bounds on if you want to set the all the bounds of the dialog, or,
if you want to set just the width and height of the dialog, which centers the dialog in
the middle of the screen, then uncheck this option.
------------------------------------
Preferences
Editing options
• Snap to Grid - Check this option to turn on snap to grid for easier alignment of items.
• Live Dragging - This option allows live dragging of items in the main window.
• Responsive properties palette - With this checked, selecting an item in the main window
automatically reveals the item or window tab in the properties palette, and hilite the name or
contents field for ready key input.
• Remember window positions - With this option, positions of all windows are retained.
• Sticky Palettes - Sticky palettes keeps the palettes tidy by keeping them aligned to the main window.
• Non Persitent guides - With this checked, (and guides turned on)
guides only appear if the item is being dragged.
Popups
• Script type - With this popup choose the script type you require:
- Auto
- Live
- Ask presents a prompt every time you export a script asking for the script type you require.
(See the Dialog Director manual for info on script types.)
• Export script
- Show preview - presents a dialog previewing the AppleScript code and options for
continuing the export: Copy to clipboard, Open in Editor, and Save as file.
- Copy to Clipboard - copies the resultant script to the clipboard. Save as file asks the
user for a destination to save the script file.
- Open in Editor - opens the script in the script editor of choice (see below) and also presents an option.
- Run - to compile and run the script on the fly.
• Default Editor lets the user select the editor of his choice for saving and opening scripts.
------------------------------------
Creating a Dialog
Drag any of the dialog items off the tools palette onto the main window. When an item is first dragged to the main window, the name or content field (this is dependent on the kind of item) is selected in the properties palette ready for editing. Once placed, these items can be positioned anywhere within the window. If the Responsive properties palette option is turned on (see preferences above) the hiliting and selecting of the name or content fields on the property palette occur as you select each item.
Drag Resizing items - While holding down the command key while dragging on an item, the item is resized according to the direction of the drag. Resizing always occurs at the bottom right point of the item, with the top left point of the item fixed in position. By clicking anywhere in the item with the command key down, the cursor jumps to the bottom right point of the item.
Live Guides - With guides turned on, guides attached themselves to the edges of the item, and follow that item around when dragged. This allows for easier and more accurate alignment of items. With Non-Persistent guides checked (in preferences) the guides are only visible when an item is actually being dragged, or when the mouse is pressed while the cursor is over that item.
Option click items - Holding down the option key while clicking on some items changes that items state: command clicking a push button toggles its default item property on and off, option clicking checkboxes and radio buttons toggles their value (checked) states. If you command click an icon, it cycles the Note, Alert and Stop icons.
Deleting items - To delete an item select Clear from the item menu, or press the delete button on the tool palette. Holding down option while pressing the delete button skips the alert delete dialog.
Duplicate - To duplicate an item, press the duplicate button on the tools menu, or selete duplicate from the Item menu. Holding option down in each case raises a duplicate dialog which allows you to set the duplicate offsets. These duplicate values, when entered, are retained thoughout the current Dialog Studio session.
Move Again - Move again moves an item in the main window to the same relative offsets as the last item that was moved by dragging. This can be handy if you need to move several items in a window because multiple selections are not available in Dialog Studio. The Move Again command does not consider items moved by nudging or duplicating, or new items dragged onto the main window as the "last moved item"
Grouping Radio Buttons - Dialog Studio does not implement radio groups as Dialog Director does. While it is easy to create several radio buttons to form one group in Dialog Studio, creating groups of radio buttons requires a little forethought:
1. Create the radio buttons you require for one group.
2. Create another item i.e. a push button or static text item.
3. Create the radio buttons you require for the second group.
As long as radio buttons are in sequence with another, they will be grouped as one radio group. If a sequence of radio buttons is broken by another dialog item, then the group is divided into two groups. If you have already laid out your dialog, and then decide that the radio buttons should be split into two radio groups, then select any other item in the main window and bring it to the front (Bring to Front, under the Item menu). Then, perform the same bring to front command on the group of radio buttons that you want grouped as one radio group. This ensures that the sequence of radio buttons is broken by another dialog item.
Custom Icons - Up to five custom icons (besides the normal Note, Alert and Stop icons) can be created with Dialog Studio. When you choose a custom icon, a custom icon appears on the main window with the number of that icon. This acts as a placeholder, which is only viewable in Dialog Studio. When you run the script later, the space where this custom icon should appear will be empty. The next step is to run your script throught DS Icon Imbedder (included with Dialog Studio) which imbeds any of a number of provided icons into your script. Instructions for using Icon Imbedder are in the Icon Imbedder folder).
------------------------------------
Saving a dialog
Dialogs can be saved as native Dialog Studio files for later editing. Remember that when you export a script, it may be advisable to save your dialog as a Dialog Studio file in case you want to change it. (This current version of Dialog Studio does not read dialogs from AppleScripts.)
For users who have version 1.0 Dialog Studio dialog files, a supplied file converter is provided to bring them up to date with version 1.1.
------------------------------------
Exporting an AppleScript
There are four options when it comes to exporting an AppleScript from Dialog Studio:
• Copy to clipboard - just puts the script on the clipboard
• Save - saves the script to a file of the type nominated by the "Default Editor" option.
• Preview - this option lets you preview your script before you export it.
Here, you might want to make some changes to the script before editing.
• Open in editor - Open in editor lets you export script directly to an new script window in your
favorite script editor (choose this in the preferences dialog).
• Run - When the Open in Editor option is chosen, a "Run" checkbox appears with the option of compiling
and running the script as well as opening it.
------------------------------------
Other Notes
• No closebox or button warning
Dialog Studio provides built in safeguards against creating scripts that don't contain a window
close box or push button. If a window does not contain either of these, you may find yourself
having to force quit a script, and risking a crash.
• Enter key on Properties palette
When editing the content field on the Property palette, the enter key does not type a return.
Use the return key on your keyboard instead.
• Out of bounds items alert
If you have created a dialog, then reduced the window size, covering one or more
items in the process, an alert will tell you that one or more items were found outside of
the window bounds. You will have to go in and delete that item before exporting the script.
• Resizing windows
You can resize windows by dragging only if the window is set to
standard or floating palette style. If you want to resize a standard dialog,
for example, you can switch to standard window, resize it, then switch back again.
(Or use the width and height fields on the property palette.)
• Beep while moving or duplicating
If a beep sounds while attempting to use the Move Again or Duplicate commands,
it may because the move or duplicate distance falls off the edge of the window.
• Plain dialog appearance
The plain dialog window style displays as shadowed dialog in Dialog Studio.